home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10150 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  978 b 

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: bitfields, how big can their elements be?
  5. Date: 16 Mar 1996 07:15:06 +1300
  6. Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
  7. Message-ID: <4icc3a$g9i@airdmhor.gen.nz>
  8. References: <4i2lab$ili@hobbes.cc.uga.edu> <TANMOY.96Mar12075107@qcd.lanl.gov> <4i4c8dINNsde@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: airdmhor.gen.nz
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Kazimir Kylheku:
  13. > With GCC I tried making bitfields "long" and "short". This is an odd locution;
  14. > the compiler will actually prevent a "short" field from being more than 16
  15. > bits, but long can be 32. It's strange that the GNU compiler allows these
  16. > modifiers for bitfields! I'm going to have to look this up in the standard the
  17. > first chance I get.
  18.  
  19.   I'm fairly certain that they're supposed to be limited to 
  20. (CHAR_BIT * sizeof(int)) bits. and they can't cross int boundaries.
  21.